package cn.wusifx.zabbix.request.builder.script;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/script/update
 */
public class ScriptUpdateRequestBuilder extends UpdateRequestBuilder {
    private String scriptId;
    public ScriptUpdateRequestBuilder(String auth) {
        super("script.update", auth);
    }

    public ScriptUpdateRequestBuilder( Long id, String auth) {
        super("script.update", id, auth);
    }

    public String getScriptId() {
        return scriptId;
    }

    public ScriptUpdateRequestBuilder setScriptId(String scriptId) {
        this.scriptId = scriptId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("scriptid",scriptId);
        return baseRequest;
    }
}
